package com.vito.dcs.asphalt.asphaltDataLog.service.impl;

import java.util.*;
import org.springframework.beans.factory.annotation.*;

import com.vito.dcs.asphalt.asphaltDataLog.model.DataAsphaltBlenderLogModel;
import com.vito.dcs.asphalt.asphaltDataLog.service.DataAsphaltBlenderLogService;
import com.alibaba.dubbo.config.annotation.Service;
import com.vito.dcs.asphalt.asphaltDataLog.dao.DataAsphaltBlenderLogMapper;
import com.vito.base.model.DataGrid;
import com.vito.base.factory.IDFactory;

/**
 * DataAsphaltBlenderLogService接口实现类
 * @author  fangj E-mail: 
 * @version 0.1.1
 * @date    2019-4-12 14:59:05
 */
@Service
public class DataAsphaltBlenderLogServiceImpl implements DataAsphaltBlenderLogService {
	
	@Autowired
	private DataAsphaltBlenderLogMapper dataasphaltblenderlogMapper;
	
	@Override
	public int save(DataAsphaltBlenderLogModel dataasphaltblenderlog){
		return dataasphaltblenderlogMapper.save(dataasphaltblenderlog);
	}
	@Override
	public DataGrid<DataAsphaltBlenderLogModel> queryAllByPage(DataAsphaltBlenderLogModel dataasphaltblenderlog){
		DataGrid<DataAsphaltBlenderLogModel> dg = new DataGrid<DataAsphaltBlenderLogModel>();
		dg.setRows(dataasphaltblenderlogMapper.queryAllByPage(dataasphaltblenderlog));
		dg.setTotal(dataasphaltblenderlog.getTotal());
		return dg;
	}
	@Override
	public DataAsphaltBlenderLogModel query(DataAsphaltBlenderLogModel dataasphaltblenderlog){
		return dataasphaltblenderlogMapper.query(dataasphaltblenderlog);
	}
	@Override
	public Integer update(DataAsphaltBlenderLogModel dataasphaltblenderlog){
		return dataasphaltblenderlogMapper.update(dataasphaltblenderlog);
	}
	
	@Override
	public Integer delete(DataAsphaltBlenderLogModel dataasphaltblenderlog){
		return dataasphaltblenderlogMapper.delete(dataasphaltblenderlog);
	}

    @Override
	public int saveDataAsphaltBlenderLog(DataAsphaltBlenderLogModel dataasphaltblenderlog){
	    dataasphaltblenderlog.setId(IDFactory.getIDFactory().getIdInc()+"");    
		return save(dataasphaltblenderlog);
	}
}